(function () {
    var obj = {
        a: 2
    }

    var obj1 = Object.create(obj);
    obj1.b = 3;

    //in 操作符会检查整个原型链
    for (var key in obj1) {
        var element = obj1[key];
        console.log(key + ":" + element);
    }

    console.log("a" in obj1);
})();


(function () {
    console.log("===========second==============")
    var obj = {
        a: 2
    }

    var obj1 = Object.create(obj);
    obj1.a = 3;//todo 这里好像存在遮盖

    //in 操作符会检查整个原型链
    for (var key in obj1) {
        var element = obj1[key];
        console.log(key + ":" + element);
    }
})();
